package com.social.serviceImpl;

import com.social.dao.UserRoleMapper;
import com.social.pojo.UserRole;
import com.social.service.UserRoleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

@Service
@Transactional
public class UserRoleServiceImpl implements UserRoleService {
    @Autowired
    private UserRoleMapper userRoleMapper;

    @Override
    public int delete(Integer id) {
        int status = userRoleMapper.delete(id);
        return status;
    }

    @Override
    public int insert(UserRole record) {
        int status = userRoleMapper.insert(record);
        return status;
    }

    @Override
    public int insertSelective(UserRole record) {
        int status = userRoleMapper.insertSelective(record);
        return status;
    }

    @Override
    public int update(Integer uid, Integer pid) {
        int status = userRoleMapper.update(uid, pid);
        return status;
    }
}
